<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width= , initial-scale=1.0">
    <title>Document</title>
    <style>
        p{
            color: aqua;
            background-color: azure;
        }

    </style>
</head>

<body>
    <img src="" alt="" id="img">
    <script>
        class Person{
            constructor(name){
                this.name=name;
            }
            speak(){
                console.log('father')
            }
        }

        class Son extends Person{
            constructor(name,age){
                super(name);
                this.age=age
            }

            speak(){
                super.speak();
                console.log('son')
            }
        }

        const a=new Son('tong',24)
        console.log(a.name,a.age)
        a.speak();


    </script>
</body>

</html>